import { Directive, HostListener } from '@angular/core';
import { IonicPage, ModalController} from 'ionic-angular';

@Directive({
  selector: '[zoom-in-modal]', // Attribute selector
  inputs: ['src']
})
export class ZoomInModalDirective {
	private src: string;

  constructor(public modalCtrl: ModalController) {
    console.log('Hello ZoomInModalDirective Directive');
  }

  @HostListener('click')
  onClick() {
  	let imgModal = this.modalCtrl.create('ZoomInModalPage', {
  		src: this.src
  	});
  	imgModal.present();
	}

}
